package cn.bctools.mail.entity.dto;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@ApiModel(value = "用户注册登录对象")
public class RegisterDTO {

    @ApiModelProperty(value = "邮箱名")
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String username;

    @NotBlank(message = "邮箱不能为空")
    @Size(min = 2, max = 20, message = "用户名最少2位，最多20位")
    private String password;
}
